* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
#app {
  width: 100%;
  height: 100%;
  padding: 40px 16px;
}

.edit-box {
  border: 1px solid #000;
  display: flex;
  flex-direction: column;
}
#edit {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 50vh;
  padding: 12px;
  border-top: 1px solid #000;
}
#edit:empty::after {
  content: attr(placeholder);
}

.tools {
  width: 100%;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  align-content: flex-start;
}
.group{
  padding: 0 8px;
  border-right: 1px solid #e6e0e0;
  display: flex;
  align-items: center;
  column-gap: 8px;
}
.group:last-of-type{
  border-right: none;
}

button[name='tool'] {
  --menuShow: 0;
  --menuHeight: 0px;
  position: relative;
  width: fit-content;
  height: 24px;
  padding: 0 4px;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
}
button[name='tool']:hover {
  --menuShow: 1;
  --menuHeight: fit-content;
}
.has-tip:hover::before {
  content: attr(tip);
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, -30px);
  width: fit-content;
  height: 24px;
  min-width: 20px;
  padding: 0 8px;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0.5;
}
.has-tip:hover::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, -26px);
  width: 0;
  height: 0;
  border-top: 4px solid #000;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: none;
  opacity: 0.5;
}
button[name='tool'].active {
  background: #e1e4e8;
}
.menu-sub {
  position: absolute;
  z-index: 1;
  left: 0;
  width: var(--menuHeight);
  height: var(--menuHeight);
  padding: 2px 0;
  background-color: #fff;
  border: 1px solid #ccc;
  opacity: var(--menuShow);
  transition: opacity 0.2s linear;
  overflow: hidden;
}
.menu-sub:hover {
  --menuShow: 1;
  --menuHeight: fit-content;
}
.menu-sub > li {
  padding: 6px 10px;
  text-align: left;
  list-style: none;
}
.menu-sub > li:hover {
  background-color: #f4f6f8;
}
button[check]{
  opacity: 0;
}